package org.nnxy.foodboot.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 用户实体类
 */
@Data
@TableName("user")
public class User {
    
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    
    private String username;
    
    private String password;
    
    private String nickname;
    
    private String avatar;
    
    private String email;
    
    private String phone;
    
    private Integer gender;
    
    private LocalDate birthday;
    
    private BigDecimal height;
    
    private BigDecimal weight;
    
    private String healthGoal;
    
    private String dietaryRestrictions;
    
    private String allergies;
    
    private Integer dailyCalories;
    
    private String activityLevel;
    
    private LocalDateTime lastLoginTime;
    
    private Integer status;
    
    /**
     * 用户角色：admin - 管理员，user - 普通用户
     */
    private String role;
    
    @TableLogic
    @TableField(value = "del_flag")
    private String delFlag;
    
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
} 